﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;


namespace WebApplication1
{
    public class vendorModel
    {
        public string cvencode { get; set; }

        public string cvenname { get; set; }


        public string cVenAbbName { get; set; }


        public string cvccode { get; set; }


        public string cVenDepart { get; set; }



        public string cVenPPerson { get; set; }


        public int state { get; set; }


        public DateTime dModifyDate { get; set; }

        public DateTime dVenCreateDatetime { get; set; }

    }

        public class vendorModelResult
        {
            public List<string> cvencode { get; set; }
            public List<string> cvenname { get; set; }

            public List<string> cVenAbbName { get; set; }


            public List<string> cvccode { get; set; }

            public List<string> cVenDepart { get; set; }

            public List<string> cVenPPerson { get; set; }

            public List<int> state { get; set; }

            public List<DateTime> dModifyDate { get; set; }

            public List<DateTime> dVenCreateDatetime { get; set; }

        }

        public class vendorModelConverter
        {
            public vendorModelResult Convert(List<vendorModel> items)
            {
                return new vendorModelResult
                {
                    cvencode = items.Select(item => item.cvencode).ToList(),
                    cvenname = items.Select(item => item.cvenname).ToList(),
                    cVenAbbName = items.Select(item => item.cVenAbbName).ToList(),
                    cvccode = items.Select(item => item.cvccode).ToList(),
                    cVenDepart = items.Select(item => item.cVenDepart).ToList(),
                    cVenPPerson = items.Select(item => item.cVenPPerson).ToList(),
                    state = items.Select(item => item.state).ToList(),
                    dModifyDate = items.Select(item => item.dModifyDate).ToList(),
                    dVenCreateDatetime = items.Select(item => item.dVenCreateDatetime).ToList()

                };
            }
       
    }
} 
